package xin.yangshuai.leetcode01;

/**
 * School
 *
 * @author shuai
 * @date 2021/6/25
 */
public class School {

    private String name;

    private School() {
    }

    private School(String name) {
        this.name = name;
    }

    @Override
    public String toString() {
        return "School{" +
                "name='" + name + '\'' +
                '}';
    }

    private static School mySchool = new School("北京大学");

    public static School getSchool() {
        return mySchool;
    }

    public static void main(String[] args) {
        School school = School.getSchool();
        System.out.println(school);
    }
}

